﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace UT3Bots.UTItems
{
	public class UTObject : INotifyPropertyChanged
	{

		protected UTIdentifier _id;
		protected UTVector _location;


		#region Properties

		/// <summary>
		/// The unique UT3 game Id of this object
		/// </summary>
		public UTIdentifier Id
		{
			get
			{
				return this._id;
			}
		}

		/// <summary>
		/// The 3D Vector of this object's position in the game
		/// </summary>
		public UTVector Location
		{
			get
			{
				return this._location;
			}
			internal set
			{
				this._location = value;
				OnPropertyChanged("Location");
			}
		}

		#endregion



		//Constructor
		public UTObject(UTIdentifier Id, UTVector Location)
		{
			this._id = Id;
			this._location = Location;
		}


		#region INotifyPropertyChanged Members

		public event PropertyChangedEventHandler PropertyChanged;

		protected virtual void OnPropertyChanged(string propName)
		{
			if (PropertyChanged != null)
				PropertyChanged(this, new PropertyChangedEventArgs(propName));
		}

		#endregion
	}

}
